<template>
  <div id="app">
    <hd/>
    <div id="appPageContent">
      <router-view/>
    </div>
  </div>
</template>

<script>
import hd from './components/hd.vue'
export default {
  name: 'App',
  components:{
    hd
  },
  data(){
    return{

    }
  },
  mouted(){
    this.getUserInfo()
  },
  methods:{
    getUserInfo(){
      //此处请求用户信息接口

      //
      let data = {
          user_id:1,
          user_name:"muskli",
          role_id:1,
          role_name:'超级管理员'
      }
      this.setUserInfo(data)
    },
    setUserInfo(data){
      this.$store.commit('SET_USER_INFO',data);
      console.log(this.$store.userInfo.user_id);
    }
  }
}
</script>

<style lang='less'>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
#appPageContent{
  margin: 50px auto;
  max-width: 1750px;
  padding:0 80px;

  // min-width: 1730px;
}
#app ::-webkit-scrollbar { width: 0 !important }

</style>
